{% extends '@offers/offer/form.html.twig' %}

{% block body %}
<div class="container-fluid bg-dark text-white">
    <div class="container">
        <div class="row align-items-center pt-2 pb-2 pt-lg-5 pb-lg-5">
            <div class="col-lg-3 d-none d-lg-flex spec-logo">
                {% include '@offers/specialization/_logo.html.twig' with {specialization: specialization.slug} only %}
            </div>
            <div class="col-lg-6 text-center">
                <h1 class="font-weight-light">
                    Post
                    <span class="text-green">{{ specialization.slug|specialization_name }}</span>
                    Offer
                </h1>
            </div>
            <div class="col-lg-3 d-none d-lg-flex">
                {% if throttled and extraOffersCount <= 0 %}
                    <small><i class="fas fa-pen-square text-danger mr-2"></i> 0 immediate offers left</small>
                {% else %}
                <small><i class="fas fa-pen-square text-green mr-2"></i> {{ offersLeft + extraOffersCount }} Offers you can post immediately</small>
                {% endif %}
            </div>
        </div>
    </div>
</div>
<div class="container-fluid">
    {% if not form.vars.valid %}
        <div class="container mt-4 border-bottom">
            <div class="row">
                <div class="col-md-12">
                    <div class="alert alert-danger text-center" role="alert">
                        Your offer has errors, please scroll down and fix them before posting offer.
                    </div>
                </div>
            </div>
        </div>
    {% endif %}
    {% if throttled and extraOffersCount <= 0 %}
    <div class="container mt-4 border-bottom">
        <div class="row">
            <div class="col-md-12">
                <div class="alert alert-success text-center small text-dark">
                    Sorry, you already added {{ throttleLimit }} offers in last {{ throttleSince.format('%d') }} days, please wait. Still have some really cool offers? <br/>
                    Email us some at <a href="mailto:{{ contact_email }}">{{ contact_email }}</a> and we might
                    grant you couple <strong>instant offers</strong>!
                </div>
            </div>
        </div>
    </div>
    {% endif %}
    {{ parent() }}
</div>
{% endblock %}